Skip to content

VirtualTimeSchedulerBase.AdvanceBy(TRelative) method

Defined in

Type: VirtualTimeSchedulerBase Namespace: System.Reactive.Concurrency Assembly: System.Reactive.dll

Applies to

netstandard2.0

public void AdvanceBy(TRelative time)

Summary: Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.

Parameters

NameTypeDescription
timeTRelativeRelative time to advance the scheduler's clock by.

Exceptions

TypeCondition
System.ArgumentOutOfRangeExceptiontime is negative.
System.InvalidOperationExceptionThe scheduler is already running. VirtualTimeScheduler doesn't support running nested work dispatch loops. To simulate time slippage while running work on the scheduler, use [Sleep](#